package com.jz.controller;

import com.jz.module.dto.TMessageDto;
import com.jz.service.MessageService;
import com.jz.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/message")
public class MessageController {

    @Autowired
    private MessageService messageService;


    @RequestMapping("/listByParam")
    public ResultUtil listByParam(TMessageDto dto) {
        return messageService.listByParam(dto);
    }


    @RequestMapping("/page")
    public ResultUtil page(TMessageDto dto) {
        return messageService.page(dto);
    }

    @RequestMapping("/list")
    public ResultUtil list(TMessageDto dto) {
        return messageService.list(dto);
    }

    @RequestMapping("/query")
    public ResultUtil query(TMessageDto dto) {
        return messageService.query(dto);
    }


    @RequestMapping("/save")
    public ResultUtil save(TMessageDto dto) {
        return messageService.save(dto);
    }

    @RequestMapping("/delete")
    public ResultUtil delete(TMessageDto dto) {
        return messageService.delete(dto);
    }

}
